package com.tracemap.websender;

import java.util.ArrayList;

import org.json.JSONException;

import com.tracemap.websender.jsonparser.EmployeeJSON;
import com.tracemap.websender.xmlparser.EmployeeRepository;
import com.tracemap.websender.xmlparser.EmployeeXML;

public class XMLAndJSONTester {
	static void main(){
		String XMLSerializedResources = ResourceHelper.loadManySerialized("http://demos.brianbuikema.com/apps/soa_services/employees?format=XML");
		String JSONSerializedResources = ResourceHelper.loadManySerialized("http://demos.brianbuikema.com/apps/soa_services/employees?format=JSON");
		
		
		ArrayList<EmployeeXML> employees = EmployeeRepository.loadMany("http://demos.brianbuikema.com/apps/soa_services/employees?format=XML");
		
		try {
			ArrayList<EmployeeJSON> employees2 = EmployeeJSON.deserializeArray(ResourceHelper.loadManySerialized("http://demos.brianbuikema.com/apps/soa_services/employees?format=JSON"));
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
